package com.xq;

import com.xq.props.Props;
import com.xq.props.Regeneration;
import com.xq.props.Weapon;

/**
 * @description:
 * @author: 软妹倩哟
 * @date: Created in 2020/6/7 13:54
 * @version: 1.0
 * @modified By:
 */
public class Scene {
    Hunter hunter;
    Room outside, lobby, pub, study, bedroom;
    Monster m1,m2,m3,m4,m5;
    Props p1, p2, p3, p4, p5;

    public void initScene() {
        this.creatMonsters();
        this.createRooms();
    }

    public void creatMonsters() {
        m1 = new Monster(1);
        m2 = new Monster(3);
        m3 = new Monster(4);
        m4 = new Monster(2);
        m5 = new Monster(3);
    }

    public void createProps() {
        p1 = new Weapon("101", "步枪m416", 10);
        p2 = new Regeneration("110", "生命药水", 10);
        p3 = new Weapon("102", "步枪AKM", 20);
        p4 = new Weapon("103", "步枪Groza", 30);
        p5 = new Regeneration("111", "生命药剂", 20);
    }

    public void createRooms() {
        createProps();
        outside = new Room("城堡外",m5, p1);
        lobby = new Room("大堂",m2, p2);
        pub = new Room("小酒吧",m3, p3);
        study = new Room("书房",m4, p4);
        bedroom = new Room("卧室",m1, p5);


        //	初始化房间的出口
        outside.setExit("east" , lobby);
        outside.setExit("south" , study);
        outside.setExit("west" , pub);
        lobby.setExit("west" , outside);
        pub.setExit("east" , outside);
        study.setExit("north" , outside);
        study.setExit("east" , bedroom);
        bedroom.setExit("west" , study);

        hunter = Hunter.getHunter();
        hunter.currentRoom = outside;
    }

    public Hunter getHunter() {
        return hunter;
    }

    public void setHunter(Hunter hunter) {
        this.hunter = hunter;
    }
}
